<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<style>
    div{
        background:url("img/0001.jpg") no-repeat;
        width:200px;
        height:100px;
        border:2px solid  red;
        margin:20px;
    }

    .a{
        background-size:cover; /*完全覆盖*/
    }

    .b{
        background-size:contain; /*完全适应*/
    }
</style>
<body>
    
    <div class="a"></div>
    <div class="b"></div>
</body>
</html>